<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改密码')"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-devInfo-add">
			<div class="form-group">
				<label class="col-sm-3 control-label">设备ID：</label>
				<div class="col-sm-8">
					<input id="devId" name="devId" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">所属公司：</label>
				<div class="col-sm-8">
				<select id="companyId"    name="companyId"  >
					<option value="">请选择</option>
					<option th:each="company : ${companyList}" th:text="${company.orgName}" th:value="${company.compId}"></option>
				</select>
			</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">厂商及型号：</label>
				<div class="col-sm-8">
					<input id="devCompany" name="devCompany" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">设备机器号：</label>
				<div class="col-sm-8">
					<input id="devMachineNo" name="devMachineNo" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">状态：</label>
				<div class="col-sm-8">
					<select  name="status" >
						<option  value="0">启用</option>
						<option value="1">启用</option>
					</select>
			</div>
			</div>

<!--
			<div class="form-group">
				<label class="col-sm-3 control-label">适用餐别：</label>
				<div  class="radio-box"  th:each="dict : ${@dict.getType('dinner_type')}">
					<input type="checkbox"   th:text="${dict.dictLabel}"  name="belongType"  th:value="${dict.dictValue}"
					/>
				</div>
			</div>
			-->
			<div class="form-group">
			<div class="form-control-static col-sm-offset-9">
				<button type="submit" class="btn btn-primary">提交</button>
				<button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
			</div>
		</div>
		</form>
	</div>

    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "dev/devInfo";
        $("#form-devInfo-add").validate({
            rules:{
                devId:{
                    required:true
                },
                devCompany:{
                    required:true
                },devMachineNo:{
                    required:true
                },
            },
            submitHandler: function(form) {
                $.operate.save(prefix + "/add", $('#form-devInfo-add').serialize());
            }
        });

	</script>
</body>
</html>
